package cn.mxb.logic.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.mxb.floor.pagination.Result;
import cn.mxb.logic.dao.MxbCardDAO;
import cn.mxb.logic.entity.MxbCard;
import cn.mxb.logic.service.IMxbCardService;

@Service("mxbCardService")
public class MxbCardServiceImpl  implements IMxbCardService {

	@Autowired
	private MxbCardDAO mxbCardDAO;
	
	
	@Override
	public MxbCard findByProperty(String property, String value) {
		return mxbCardDAO.findByProperty(property, value);
	}

	/**
	 * 分页
	 */
	@Override
	public Result<MxbCard> find(MxbCard mxbCard, int page, int row) {
		return mxbCardDAO.find(mxbCard, page, row);
	}

	/**
	 * add
	 */
	@Override
	public MxbCard add(MxbCard mxbCard) {
		return mxbCardDAO.save(mxbCard);
	}

	@Override
	public void delete(int id) {
		mxbCardDAO.remove(MxbCard.class,id);
	}
	@Override
	public void update(MxbCard mxbCard) {
		mxbCardDAO.update(mxbCard);
	}
	
	@Override
	public List<MxbCard> findListByProperty(String property, String value) {
		return mxbCardDAO.findListByProperty(property, value);
	}

	/**
	 * 查询全部
	 */
	@Override
	public List<MxbCard> findAllList() {
		return mxbCardDAO.getAll(MxbCard.class);
	}


	
}
